{
  "name"    : "Demobrowser - config.json",

  /*
   * Main Demobrowser config file; runs external Python processes, to generate data
   * and dynamic config file for demos; the actual compile jobs are delegated to 
   * config.demobrowser.json, which includes the generated config.demo.json.
   */

  "include" :
  [
    {
      "path" : "${QOOXDOO_PATH}/tool/data/config/application.json",
      "block" : 
      [ 
        "common",
        "source", 
        "source-script", 
        "source-hybrid",
        "build",
        "build-script",
        "build-files",
        "build-resources",
        "info"
      ]
    },
    {
      "path" : "image.json"
    }
  ],

  "export" :
  [
    "api",
    "api-data",
    "build",
    "build-data",
    "clean",
    "distclean",
    "fix",
    "image-combine",
    "info",
    "inspector",
    "lint",
    "publish",
    "source",
    "source-data",
    "source-hybrid",
    "test",
    "test-source",
    "translation",
    "migration",
    "simulation-build",
    "simulation-run"
  ],
  
  "default-job" : "source",

  "let" :
  {
    "APPLICATION"  : "demobrowser",
    "API_EXCLUDE"  : ["qx.test.*", "${APPLICATION}.demo.*", "${APPLICATION}.test.*"],
    "QOOXDOO_PATH" : "../..",
    // need to include all locales used in demos here, so 'translation' job picks them up
    "LOCALES"      : ["en", "en_US", "de", "de_DE", "fr", "fr_FR"],
    "THEME"        : "demobrowser.Theme"
  },

  "config-warnings" : 
  {
    "job-shadowing" : ["simulation-run", "translation"],
    
    "environment" : [ "non-literal-keys" ]
  },

  "jobs" :
  {
    "common" :
    {
      "desc"    : "common settings for Demobrowser jobs",

      "extend"  : [ "cache" ],

      "library" :
      [
        {
          "manifest" : "${QOOXDOO_PATH}/framework/Manifest.json"
        },

        {
          "manifest" : "Manifest.json"
        }
      ],

      "include" :
      [
        "${APPLICATION}.Application",
        "${THEME}"
      ],

      "environment" :
      {
        "qx.version" : "${QOOXDOO_VERSION}",
        "qx.revision" : "${QOOXDOO_REVISION}",
        "qx.application" : "${APPLICATION}.Application",
        "qx.theme" : "${THEME}",
        "qx.allowUrlSettings" : true
      },

      // the next is in since resource copying is done here for the demos as well
      "asset-let" :
      {
        "qx.icontheme" : ["Tango", "Oxygen"],
        "qx.theme"     : ["Indigo"]
      }
    },

    // -- Source jobs ----------------------------------------------------------

    "source-data" :
    {
      "desc"    : "creates a Json index of all demos (demodata.js), for Demobrowser's navigation pane",

      "extend" : ["common"],

      "shell" :
      {
        "command" : "${PYTHON_CMD} tool/gendata.py ./source/script ./source/demo"
      }
    },


    "source-demobrowser" :
    {
      "extend" : ["common"],

      "shell" :
      {
        "command" : "${PYTHON_CMD} ${QOOXDOO_PATH}/tool/bin/generator.py ${GENERATOR_OPTS} -c config.demobrowser.json source"
      }
    },


    "source" :
    {
      "desc"    : "create source version of Demobrowser",

      "run" :
      [
        // preparations  
        "source-data",
        // do the compiling with a different config 
        "source-demobrowser"
      ]
    },


    "source-hybrid-demobrowser" :
    {
      "extend" : ["common"],

      "shell" :
      {
        "command" : "${PYTHON_CMD} ${QOOXDOO_PATH}/tool/bin/generator.py ${GENERATOR_OPTS} -c config.demobrowser.json source-hybrid"
      }
    },


    "source-hybrid" :
    {
      "desc"    : "create source-hybrid version of Demobrowser",

      "run" :
      [
        "source-data",
        "source-hybrid-demobrowser"
      ]
    },


    // -- Build jobs -----------------------------------------------------------

    "build-data" :
    {
      "desc"    : "creates a Json index of all demos (demodata.js), for Demobrowser's navigation pane",

      "extend" : ["common"],

      "shell" :
      {
        "command" : "${PYTHON_CMD} tool/gendata.py ./build/script ./source/demo"
      }
    },


    "build-demobrowser" :
    {
      "extend" : ["common"],

      "shell" :
      {
        "command" : "${PYTHON_CMD} ${QOOXDOO_PATH}/tool/bin/generator.py ${GENERATOR_OPTS} -c ./config.demobrowser.json build"
      }
      
    },


    "build" :
    {
      "desc"    : "create build version of Demobrowser",

      "run" :
      [
        // preparations
        "build-data",
        // do the compiling with a different config
        "build-demobrowser"
      ]
    },
    
    // -------------------------------------------------------------------------

    "simulation-run" :
    {
      "let" : 
      {
        "SELENIUM_SERVER" : "localhost",
        "SELENIUM_PORT" : 4444,
        "SELENIUM_BROWSER" : "*firefox3",
        "AUT_HOST" : "http://localhost",
        "AUT_PATH"     : "/qx/trunk/qooxdoo/application/demobrowser/build/index.html",
        "SIMULATOR_APPLICATION" : "simulator.reporter.Application",
        "SIMULATOR_REPORTSERVER" : false
      },
      
      "environment" :
      {
        "simulator.selServer"   : "${SELENIUM_SERVER}",
        "simulator.selPort"     : "${SELENIUM_PORT}",
        "simulator.testBrowser" : "${SELENIUM_BROWSER}",
        "simulator.autHost"     : "${AUT_HOST}",
        "simulator.autPath"     : "${AUT_PATH}",
        "simulator.reportServer": "${SIMULATOR_REPORTSERVER}",
        "simulator.applicationLog" : true,
        "simulator.globalErrorLogging" : true
      }
    }

    ,"info" : 
    {
      "shell" :
      {
        "command" : "${PYTHON_CMD} ${QOOXDOO_PATH}/tool/bin/generator.py ${GENERATOR_OPTS} -c ./config.demobrowser.json info"
      }
    }
    
    ,"translation" :
    {
      "translate" : { "poentry-with-occurrences" : false  }
    }
  }
}
